{
PROB : guess
LANG : PASCAL
ID : phamnamlo2
}

program guess;
var
  n, m : longint;

procedure inp;
begin
  readln(n);
end;

procedure process;
var
  s : string;
  mid, l, r, i : longint;
begin
  s := '';
  l := 1;
  r := n;
  while l <= r do
  begin
    mid := (l+r) div 2;
    writeln(mid);
    flush(stdout);
    readln(s);
    if s = 'H' then r := mid-1
    else
      if s = 'L' then l := mid+1
      else break;
  end;
end;

procedure out;
begin
end;

begin
  inp;
  process;
  out;
end.
